home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / mus / misc / xmodule26b.lha / XModule / Install_XModule < prev    next >
Text File  |  1994-04-06  |  5KB  |  203 lines

  1. ; $VER: Install_XModule 2.1 (10.2.94)
  2. ;
  3. ; Installer script for XModule
  4.  
  5. ;***************************************************************************
  6. ; English strings
  7. ;***************************************************************************
  8.  
  9. (set default_lang 1)
  10.  
  11. (set #askdirstr        (cat "In which directory should XModule be installed?\n"
  12.                     "(A drawer called \"XModule\" will be created)"))
  13.  
  14. (set #askdir-help    (cat "Please select the directory or partition in which you would like "
  15.                     "XModule installed (a drawer named \"XModule\" will be created "
  16.                     "in the directory you have selected).\n\n\n"
  17.                     @askdir-help))
  18.  
  19. (set #magicwb-str    (cat "Do you want MagicWB-style icons for XModule?\n"
  20.                     "(Requires MagicWB installed in your system)\n\n"
  21.                     "MagicWB is a collection of fine 8 color icons made by "
  22.                     "Martin Huttenloher.  These icons require a special palette, "
  23.                     "otherwise they look awful.\n"))
  24.  
  25. (set #magicwb-help    "Answer \"Yes\" only if your system preferences are properly set.")
  26.  
  27. (set #docformat-help (cat "Choose AmigaGuide documentation if you are running "
  28.                     "WorkBench 2.1 or higher and/or you have Commodore AmigaGuide "
  29.                     "hypertext reader installed.  Otherwhise choose the normal "
  30.                     "documentation.\n\n"
  31.                     @askoptions-help))
  32.  
  33. (set #bad-kick        "Sorry, XModule requires Kickstart version 2.04 or higher.")
  34.  
  35. (set #makingdir            "Creating XModule directory...")
  36. (set #copying-xmodule    "Copying XModule...")
  37. (set #copying-doc        "Copying ASCII Documentation...")
  38. (set #copying-guide        "Copying AmigaGuide Documentation...")
  39.  
  40.  
  41. ;***************************************************************************
  42. ; Make sure we are running under a 2.04 ROM
  43. ;***************************************************************************
  44.  
  45. (set sys-ver (/ (getversion) 65536))
  46.  
  47. (if (< sys-ver 37)
  48. (
  49.     (abort #bad-kick)
  50. ))
  51.  
  52.  
  53. (welcome) ; Say Hi!
  54.  
  55.  
  56. ;***************************************************************************
  57. ; Ask user where he wants the XModule files
  58. ;***************************************************************************
  59.  
  60. (set @target-dir
  61.     (askdir
  62.         (prompt #askdirstr)
  63.         (help #targetsel #askdir-help)
  64.         (default @default-dest)
  65.     )
  66. )
  67.  
  68. (set @target-dir (tackon @target-dir "XModule"))
  69. (set @default-dest @target-dir)
  70.  
  71. ;***************************************************************************
  72. ; Make the XModule directory
  73. ;***************************************************************************
  74.  
  75. (makedir
  76.     @target-dir
  77.     (infos)
  78.     (help @makedir-help)
  79.     (prompt #makingdir)
  80. )
  81.  
  82.  
  83. ;***************************************************************************
  84. ; Ask for MagicWB icons
  85. ;***************************************************************************
  86.  
  87. (if (askbool
  88.         (prompt #magicwb-str)
  89.         (help #magicwb-help)
  90.     )
  91.  
  92.     (set @magic-icons 1)
  93. )
  94.  
  95.  
  96. ;***************************************************************************
  97. ; Copy the XModule executable and its icon
  98. ;***************************************************************************
  99.  
  100. (copyfiles
  101.     (prompt @copying-xmodule)
  102.     (source "XModule")
  103.     (dest @target-dir)
  104.     (infos)
  105. )
  106.  
  107. (if (= @magic-icons 1)
  108.     (copyfiles
  109.         (source "MagicWB_Icons/XModule.info")
  110.         (dest @target-dir)
  111.     )
  112. )
  113.  
  114. (complete 40)
  115.  
  116. ;***************************************************************************
  117. ; Copy default icon for modules & instruments
  118. ;***************************************************************************
  119.  
  120. (if (= @magic-icons 1)
  121.     (copyfiles
  122.         (source "MagicWB_Icons/")
  123.         (choices "def_Module.info" "def_Instrument.info")
  124.         (dest @target-dir)
  125.     )
  126.  
  127.     (copyfiles
  128.         (source "")
  129.         (choices "def_Module.info" "def_Instrument.info")
  130.         (dest @target-dir)
  131.     )
  132. )
  133.  
  134. (tooltype
  135.     (dest (tackon @target-dir "def_Module"))
  136.     (setdefaulttool (tackon @target-dir "XModule"))
  137.     (noposition)
  138. )
  139.  
  140.  
  141.  
  142. ;***************************************************************************
  143. ; Copy documentation files
  144. ;***************************************************************************
  145.  
  146. (complete 70)
  147.  
  148. (set doc-choice (askoptions
  149.     (prompt "Please select which documentation format(s) to install:")
  150.     (help #docformat-help)
  151.  
  152.     (choices
  153.         "AmigaGuide Documentation"
  154.         "ASCII Documentation"
  155.     )
  156.     (default (if (OR (exists "SYS:Utilities/AmigaGuide") (exists "SYS:Utilities/MultiView")) 1 2))
  157. ))
  158.  
  159. (if (BITAND doc-choice 1)
  160. (
  161.     (copyfiles
  162.         (prompt @copying-guide)
  163.         (source "XModule.guide")
  164.         (dest @target-dir)
  165.         (infos)
  166.     )
  167.  
  168.     (if (= @magic-icons 1)
  169.         (copyfiles
  170.             (source "MagicWB_Icons/XModule.guide.info")
  171.             (prompt @copying-xmodule)
  172.             (dest @target-dir)
  173.         )
  174.     )
  175.  
  176.     (if (< sys-ver 39)
  177.         (tooltype
  178.             (dest (tackon @target-dir "XModule.guide"))
  179.             (setdefaulttool "SYS:Utlities/AmigaGuide")
  180.         )
  181.     )
  182. ))
  183.  
  184. (if (BITAND doc-choice 2)
  185. (
  186.     (copyfiles
  187.         (prompt @copying-doc)
  188.         (source "XModule.doc")
  189.         (dest @target-dir)
  190.         (infos)
  191.     )
  192.  
  193.     (if (= @magic-icons 1)
  194.         (copyfiles
  195.             (source "MagicWB_Icons/XModule.doc.info")
  196.             (prompt @copying-xmodule)
  197.             (dest @target-dir)
  198.         )
  199.     )
  200. ))
  201.  
  202. (complete 100)
  203.